<? $page_title='采购需求明细表' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<?php echo $root; ?>/util/datepicker/WdatePicker.js"></script>

<form method="get">
        单号：<input type="text" name="sno" value="<?= fetch_a_string('sno') ?>" size="12" />
	&nbsp;时间自：
	<input type="text" class="wdate" id="from" name="from" size="10" value="<?= fetch_a_string('from')?>"
		   onfocus="WdatePicker({onpicked:function(){$dp.$('to').focus();},maxDate:'#F{$dp.$D(\'to\')}'})" readonly />
	至 <input type="text" class="wdate" id="to" name="to" size="10" value="<?= fetch_a_string('to')?>"
		   onfocus="WdatePicker({minDate:'#F{$dp.$D(\'from\')}'})" readonly />
	&nbsp; 类型：<?= Html::options2(array( 'data'=>array_combine(array(1,2,3), $types), 'tips'=>'', 
			'val'=>fetch_a_int('type'), 'name'=>'type' )) ?>
	&nbsp; <input type="submit" value="搜索" />
</form>

<table border="0" class="list">
<tbody>
<tr class="nobg">
	<th>材料编号</th>
	<th>材料名称</th>
	<th>品牌</th>
	<th>规格</th>
	<th>单位</th>
        <th>结存数量</th>
	<th>最低库存</th>
	<th>数量</th>
	<th width="100">用途</th>
	<th>部门</th>
	<th>采购类型</th>
	<th>单号</th>
	<th>日期</th>
	<th width="100">备注</th>
</tr>
<{foreach item=ware from=$list}>
	<tr id="selstf_<{$ware.demand_id}>">
		<td><{$ware.sno}></td>
		<td><{$ware.name}></td>
		<td><{$ware.brand}></td>
		<td style="word-break:break-all;width:80px"><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td class="decimal"><{$ware.amount}></td>
                <td class="decimal"><{$ware._amount}></td>
                <td class="decimal"><{$ware.cordon}></td>
		<td><div class="text"><{$ware.remark_use}></div></td>
		<td><{$ware.dept_name}></td>
		<td><?= DemandHelper::type2text($ware.demand_type) ?></td>
		<td><?= DemandHelper::getSNO($ware.demand_id) ?></td>
		<td><{= date('Y-m-d',$ware.addtime) }></td>
		<td><div class="text"><{$ware.remark}></div></td>
	</tr>
<{/foreach}>
</tbody></table>

<? Html::pager($pager) ?>

<?include "FASHION/page_footer.phtml"?>